
from django.contrib.auth.models import User
from django.db import models

import logging

logger = logging.getLogger(__name__)


class TokenModel(models.Model):
    class Meta:
        db_table = "token"
        verbose_name = "用户token"
        verbose_name_plural = verbose_name

    token = models.CharField(max_length=100, verbose_name="token")
    user = models.ForeignKey(to=User,on_delete=models.CASCADE, verbose_name="用户", related_name='token')
    create_time = models.DateTimeField(verbose_name="创建日期",auto_now=True)
